{% macro text(name, value='', size=20) -%}
    <input name="{{ name }}" value="{{ value|e }}" size="{{ size }}">
{%- endmacro %}
{% macro button(name, value='', size=20) -%}
    <input type="button" name="{{ name }}" value="{{ value|e }}" size="{{ size }}">
{%- endmacro %}
{% macro submit(name, value='', size=20) -%}
    <input type="submit" name="{{ name }}" value="{{ value|e }}" size="{{ size }}">
{%- endmacro %}
{% macro input(name, value='', type='text', size=20) -%}
    <input type="{{ type }}" name="{{ name }}" value="{{
        value|e }}" size="{{ size }}">
{%- endmacro %}
{% macro richtext(id='rich1', name='rich1', value='', class='text') -%}
<link rel="stylesheet" type="text/css" media="screen" href="/static/theme/vnet/css/editor.css" />
<script type="text/javascript" src="/static/js/editor.js"></script>
<div class="rich">
	<div><textarea id="{{id}}" name="{{name}}" rows="5" cols="30" style="width:98%;"></textarea></div>
	<input type="button" onclick="do_me();" value="test" />
</div>
<script type="text/javascript">
	window.addEvent('domready',function(){
		// richtext
		var txt = document.getElement('.rich').getElement('textarea');
		var W3 = new wysiwyg({
			textarea: document.getElement('.rich').getElement('textarea'),
			src:'/test/empty/'
		});
		txt.rtf = W3;
	});
	function get_rtf(){
		var txt = document.getElement('.rich').getElement('textarea');
		txt.rtf.toTextarea();
		return txt.rtf.TA.value;
	}
</script>
{%- endmacro %}

